unit CacheStructANDConst;

interface

const
  GameVersion = 'Game Version 2.3.3'+#10#13;
 	WDBItemcache = 'BDIW';	//Warcraft Item Database
 	WDBItemnamecache = 'BDNW';	//Warcraft Item Name Database
 	WDBGameobjectcache =	'BOGW';	//Warcraft Game Object Database
 	WDBCreaturecache =	'BOMW';	//Warcraft MOB Database
 	WDBNpccache = 'CPNW';	//Warcraft NPC Database
 	WDBWowcache = 'NDRW';	//Warden Cache
 	WDBQuestcache = 'TSQW';	//Warcraft Quest Database
 	WDBItemtextcache =	'XTIW';	//Warcraft Item Text Database
 	WDBPagetextcache =	'XTPW';	//Warcraft Page Text Database

  Path_Itemcache = 'Itemcache.wdb';
  Path_Itemnamecache = 'Itemnamecache.wdb';
  Path_Gameobjectcache = 'Gameobjectcache.wdb';
  Path_Creaturecache = 'Creaturecache.wdb';
  Path_Npccache = 'Npccache.wdb';
  Path_Wowcache = 'Wowcache.wdb';
  Path_Questcache = 'Questcache.wdb';
  Path_Itemtextcache = 'Itemtextcache.wdb';
  Path_Pagetextcache = 'pagetextcache.wdb';

  divider = ';';

  htmlHead = '<HTML><HEAD><meta http-equiv="Content-Type" content="text/html; charset=Windows-1251" /><TITLE>Result</TITLE></HEAD><BODY>';
  htmlTable = '<table border="2" cellspacing="3" width="90%">';
  htmlEnd = '</table></BODY></HTML>';

  CacheTableHeader = 'Signature'+divider+'Build'+divider+'Locale'+divider+'RowLength'+divider+'Unk1'+divider+#0;
  CacheTableHeader_2 = htmlHead+htmlTable+
                '<tr>'+
                '<td>Signature</td>'+
                '<td>Build</td>'+
                '<td>Locale</td>'+
                '<td>RowLength</td>'+
                '<td>Unk1</td>'+
                '</tr>';

  ItemTableHeader  =
         'itemID'+divider+			//Integer
         'entryLength'+divider+ 	 //	Integer 	WDB Files
         'itemClassID'+divider+ 	 //	Integer 	ItemClass.dbc
         'itemSubClassID'+divider+ 	//	Integer 	ItemSubClass.dbc
         'Unknown'+divider+ 		//Unknown 	Added build 6022, 4-bytes
         'name'+divider+ 		 //	String
         'name'+divider+ 		//	String
         'name'+divider+ 		//	String
         'name'+divider+ 		//	String
         'itemdisplayID'+divider+ 	 //	Integer 	ItemDisplayInfo.dbc
         'qualityID'+divider+ 		//Integer 	Quality Types
         'typeBinFlag'+divider+ 	//	BitMask 	Item Types
         'buyPrice'+divider+ 		//Integer 	Value is in Copper
         'sellPrice'+divider+ 	 //	Integer 	Value is in Copper
         'inventorySlotID'+divider+ 	//Integer 	Inventory Slots
         'classBinFlag'+divider+ 	 //	BitMask 	ChrClasses.dbc - Class Types
         'raceBinFlag'+divider+ 	 //	BitMask 	ChrRaces.dbc - Race Types
         'itemLevel'+divider+ 		//Integer 	The actual base level of an item
         'requiredLevel'+divider+ 	//	Integer 	Player's required level to use
         'requiredSkillID'+divider+ //	Integer 	SkillLine.dbc - Required Skill to use
         'requiredSkillLevel'+divider+ 	//Integer 	Level of Skill required
         'requiredSpellID'+divider+ 	//Integer 	Spell.dbc - Spell required to use the item
         'requiredRankID'+divider+ 		//Integer 	Required PvP Rank to use
         'requiredUnknownRank'+divider+ 	//Integer 	Unknown PvP Ranks
         'requiredFactionID'+divider+ 	//Integer 	Required Faction Group to use
         'requiredFactionLevel'+divider+ 	//Integer 	Level of Faction required
         'stackUnique'+divider+ 		//Integer 	Maximum number of items total in your inventory
         'stackAmount'+divider+ 		//Integer 	Maximum number of items in a stack
         'containerSlots'+divider+ 	 //	Integer 	Number of slots for container
         'stat1ID'+divider+ 		//Integer 	Stat Types
         'stat1Value'+divider+ 		//Integer
         'stat2ID'+divider+ 		//Integer 	Stat Types
         'stat2Value'+divider+ 	 //	Integer
         'stat3ID'+divider+ 		//Integer 	Stat Types
         'stat3Value'+divider+ 	 //	Integer
         'stat4ID'+divider+ 		//Integer 	Stat Types
         'stat4Value'+divider+ 	 //	Integer
         'stat5ID'+divider+ 		//Integer 	Stat Types
         'stat5Value'+divider+ 		//Integer
         'stat6ID'+divider+ 		//Integer 	Stat Types
         'stat6Value'+divider+ 		//Integer
         'stat7ID'+divider+ 		//Integer 	Stat Types
         'stat7Value'+divider+ 		//Integer
         'stat8ID'+divider+ 		//Integer 	Stat Types
         'stat8Value'+divider+ 		//Integer
         'stat9ID'+divider+ 		//Integer 	Stat Types
         'stat9Value'+divider+ 		//Integer
         'stat10ID'+divider+ 		//Integer 	Stat Types
         'stat10Value'+divider+ 		//Integer
         'damage1Min'+divider+ 		//Float
         'damage1Max'+divider+ 		//Float
         'damage1TypeID'+divider+ 		//Integer 	Damage Types
         'damage2Min'+divider+ 		//Float
         'damage2Max'+divider+ 		//Float
         'damage2TypeID'+divider+ 		//Integer 	Damage Types
         'damage3Min'+divider+ 		//Float
         'damage3Max'+divider+ 		//Float
         'damage3TypeID'+divider+ 		//Integer 	Damage Types
         'damage4Min'+divider+ 		//Float
         'damage4Max'+divider+ 		//Float
         'damage4TypeID'+divider+ 		//Integer 	Damage Types
         'damage5Min'+divider+ 		//Float
         'damage5Max'+divider+ 		//Float
         'damage5TypeID'+divider+ 		//Integer 	Damage Types
         'resistPhysical'+divider+ 		//Integer 	This is your Physical Armo
         'resistHoly'+divider+ 		//Integer
         'resistFire'+divider+ 		//Integer
         'resistNature'+divider+ 		//Integer
         'resistFrost'+divider+ 		//Integer
         'resistShadow'+divider+ 		//Integer
         'resistArcane'+divider+ 	 //Integer
         'weaponDelay'+divider+ 		//Integer 	Weapon Speed in MS
         'ammoType'+divider+ 		//Integer 	Ammo Types
         'rangeModifier'+divider+ 		//Float		This float value seems to indicate the base value for range of ranged weapons. Ranged Weapons = 100.0, Fishing Poles = 3.0
         'spell1ID'+divider+ 		//Integer 	Spell.dbc
         'spell1TriggerID'+divider+ 	//Integer 	Spell Trigger Types
         'spell1Charges'+divider+ 		//Integer
         'spell1Cooldown'+divider+ 		//Integer
         'spell1CategoryID'+divider+ 	//Integer 	SpellCategory.dbc
         'spell1CategoryCooldown'+divider+ 	//Integer
         'spell2ID'+divider+ 		//Integer 	Spell.dbc
         'spell2TriggerID'+divider+ 	//Integer 	Spell Trigger Types
         'spell2Charges'+divider+ 		//Integer
         'spell2Cooldown'+divider+ 		//Integer
         'spell2CategoryID'+divider+ 	//Integer 	SpellCategory.dbc
         'spell2CategoryCooldown'+divider+ 	//Integer
         'spell3ID'+divider+ 		//Integer 	Spell.dbc
         'spell3TriggerID'+divider+ 	//Integer 	Spell Trigger Types
         'spell3Charges'+divider+ 		//Integer
         'spell3Cooldown'+divider+		//Integer
         'spell3CategoryID'+divider+ 	//Integer 	SpellCategory.dbc
         'spell3CategoryCooldown'+divider+ 	//Integer
         'spell4ID'+divider+ 		//Integer 	Spell.dbc
         'spell4TriggerID'+divider+ 	//Integer 	Spell Trigger Types
         'spell4Charges'+divider+ 		//Integer
         'spell4Cooldown'+divider+ 		//Integer
         'spell4CategoryID'+divider+ 	//Integer 	SpellCategory.dbc
         'spell4CategoryCooldown'+divider+ 	//Integer
         'spell5ID'+divider+ 		//Integer 	Spell.dbc
         'spell5TriggerID'+divider+ 	//Integer 	Spell Trigger Types
         'spell5Charges'+divider+ 		//Integer
         'spell5Cooldown'+divider+ 		//Integer
         'spell5CategoryID'+divider+ 	//Integer 	SpellCategory.dbc
         'spell5CategoryCooldown'+divider+ 	//Integer
         'bondID'+divider+ 		 //	Integer 	Bond Types
         'description'+divider+ 	 //	String
         'bookTextID'+divider+ 		//Integer 	ID of book text, found in PageTextCache.wdb
         'bookPages'+divider+ 		//Integer 	This appears to be the number of pages in said book
         'bookStationaryID'+divider+ 	//Integer 	PageTextMaterial.dbc
         'beginQuestID'+divider+ 		//Integer 	QuestCache.wdb - The quest this item begins
         'lockPickTalent'+divider+ 		//Integer 	For locked items, this is the skill needed to pick it.
         'materialID'+divider+ 		//Integer 	Material.dbc
         'sheathID'+divider+ 		//Integer 	Sheath Types The sheath position of the weapon on the character.
         'randompropertyID'+divider+ 	//Integer 	value appears only on items with randomproperties, but it's unknown how to use it
         'randompropertyID2'+divider+ 	//Integer 	This is a complete guess, but it might have something to do with extra properties
         'blockValue'+divider+ 		//Integer 	The Block this item yields, for shields
         'itemSetID'+divider+ 		//Integer 	ItemSet.dbc
         'durabilityValue'+divider+ 	//Integer 	Item Max Durability
         'itemAreaID'+divider+ 		//Integer 	AreaTable.dbc
         'itemMapID'+divider+ 		//Integer 	Map.dbc
         'bagFamily'+divider+ 		//Integer 	Special Bag Types *bitmask* itembagfamily.dbc
         'iRefID_TotemCategory'+divider+ 	//Integer 	Reference to which tools this item acts as
         'socketColor_1'+divider+ 		//Integer 	Color of socket 1
         'Unknown'+divider+ 		//Integer
         'socketColor_2'+divider+ 		//Integer 	Color of socket 2
         'Unknown'+divider+ 		//Integer
         'socketColor_3'+divider+ 		//Integer 	Color of socket 3
         'Unknown'+divider+ 		//Integer
         'iRefID_SpellItemEnchantment'+divider+ 	//Integer Socket Bonus
         'iRefID_GemProperties'+divider+ 	//Integer 	Properties of the gem
         'iRefID_ItemExtendedCost'+divider+	//Integer 	Arena "honor" cost
         'iRefID_ItemCondExtCosts'+divider+	//Integer 	Reference to ItemCondExtCosts's second column
         'disenchantSkillLevel'+divider+ 	//Integer 	Required enchanting level, to disenchant the item
         'armorDamageModifier'+divider+ 	//Float 		Shows the added armor (item class 4) or weapon damage (item class 2) for which item points are spend. Can also be negative as seen for caster weapons (damage subtracted, to gain points to spend on caster stats)
         #10;

  CreatureTableHeader =
         'Entry'+divider+
         'EntrySize'+divider+
         'Name'+divider+
         'Name2'+divider+
         'Name3'+divider+
         'Name4'+divider+
         'Description'+divider+
         'Icon'+divider+
         'type_flag'+divider+
         'type_'+divider+
         'family'+divider+
         'rank'+divider+
         'KillCredit1'+divider+
         'KillCredit2'+divider+
         'modelid1'+divider+
         'modelid2'+divider+
         'modelid3'+divider+
         'modelid4'+divider+
         'HealthModifier'+divider+
         'PowerModifier'+divider+
         'RacialLeader'+divider+
         #10;

  GameObjectTableHeader =
         'Entry'+divider+
         'EntrySize'+divider+
         'type_'+divider+
         'displayId'+divider+
         'Name'+divider+
         'Name2'+divider+
         'Name3'+divider+
         'Name4'+divider+
         'Name5'+divider+
         'castBarCaption'+divider+
         'name6'+divider+
         'data0'+divider+
         'data1'+divider+
         'data2'+divider+
         'data3'+divider+
         'data4'+divider+
         'data5'+divider+
         'data6'+divider+
         'data7'+divider+
         'data8'+divider+
         'data9'+divider+
         'data10'+divider+
         'data11'+divider+
         'data12'+divider+
         'data13'+divider+
         'data14'+divider+
         'data15'+divider+
         'data16'+divider+
         'data17'+divider+
         'data18'+divider+
         'data19'+divider+
         'data20'+divider+
         'data21'+divider+
         'data22'+divider+
         'data23'+divider+
         #10;

   QuestTableHeader =
         'questID'+divider+ 		//Integer
         'entryLength'+divider+ 		//Integer 	WDB Files
         'DuplicatedQuestID'+divider+ 	//Integer 	This is a duplicate of the quest ID
         'QuestType'+divider+ 		//Integer 	2 or 0, 0 appears to be when it's a quick click-through quest like repeatable quests (but not exclusively)
         'QuestLevel'+divider+ 		//Integer 	The level of the quest. This is not the level at which the quest is atainable at.
         'areaID/sortID'+divider+ 		//Integer 	AreaTable.dbc if negative the value points to: QuestSort.dbc
         'infoID'+divider+ 			//Integer 	QuestInfo.dbc
         'SuggestedPlayers'+divider+ 	//Integer
         'FactionID'+divider+ 		//Integer 	Faction.dbc
         'FactionAmount'+divider+ 		//Integer 	e.g. 3000
         'Unknown'+divider+ 		//Integer 	Always 0?
         'Unknown'+divider+ 		//Integer 	Always 0?
         'nextQuestID'+divider+ 		//Integer 	The quest that follows this quest
         'coins'+divider+ 			//Integer 	Value is in Copper - Coins rewarded on completion
         'SubExp70'+divider+ 		//Integer 	Value is in Copper - Coins rewarded on lvl 70 instead of experience (guess)
         'RewardSpellID'+divider+ 		//Integer 	Spell.dbc: Spell or ability that is added to players spellbook upon completion. This is probably an argument passed into EffectOnPlayer somehow, as this is sometimes a duplicated value as the EffectOnPlayer field, and it's not a spell that the player learns. (Such as the Razorhide quest turnin).
         'EffectOnPlayer'+divider+ 	 //	Integer 	Spell.dbc: Spell/effect cast on player when completing.
         'startingItemID'+divider+ 	 //	Integer 	ItemCache.wdb The item that you are given when you start the quest, such as a package to deliver.
         'QuestFlags'+divider+ 		//BitMask 	QuestFlags ("http://www.sourcepeek.com/wiki/QuestFlags")
         'givenItem1'+divider+ 		//Integer 	ItemCache.wdb
         'givenItem1Amount'+divider+ 	//Integer
         'givenItem2'+divider+ 		//Integer 	ItemCache.wdb
         'givenItem2Amount'+divider+ 	//Integer
         'givenItem3'+divider+ 		//Integer 	ItemCache.wdb
         'givenItem3Amount'+divider+ 	//Integer
         'givenItem4'+divider+ 		//Integer 	ItemCache.wdb
         'givenItem4Amount'+divider+ 	//Integer
         'choiceItem1'+divider+ 		//Integer 	ItemCache.wdb
         'choiceItem1Amount'+divider+ 	//Integer
         'choiceItem2'+divider+ 		//Integer 	ItemCache.wdb
         'choiceItem2Amount'+divider+ 	//Integer
         'choiceItem3'+divider+ 		//Integer 	ItemCache.wdb
         'choiceItem3Amount'+divider+ 	//Integer
         'choiceItem4'+divider+ 		//Integer 	ItemCache.wdb
         'choiceItem4Amount'+divider+ 	//Integer
         'choiceItem5'+divider+ 		//Integer 	ItemCache.wdb
         'choiceItem5Amount'+divider+	//Integer
         'choiceItem6'+divider+ 		//Integer 	ItemCache.wdb
         'choiceItem6Amount'+divider+ 	//Integer
         'Unknown'+divider+ 		//Integer
         'Unknown'+divider+ 		//Integer
         'Unknown'+divider+ 		//Integer
         'Unknown'+divider+ 		//Integer
         'Unknown'+divider+ 			//Integer
         'description'+divider+ 		//String
         'details'+divider+ 	 //	String
         'subdescription'+divider+ 	 //	String
         'killCreature1'+divider+ 		//Integer 	CreatureCache.wdb
         'killCreature1Amount'+divider+ 	//Integer
         'collectItem1'+divider+ 		//Integer 	ItemCache.wdb
         'collectItem1Amount'+divider+ 	//Integer
         'killCreature2'+divider+ 		//Integer 	CreatureCache.wdb
         'killCreature2Amount'+divider+ 	//Integer
         'collectItem2'+divider+ 		//Integer 	ItemCache.wdb
         'collectItem2Amount'+divider+ 	//Integer
         'killCreature3'+divider+ 		//Integer 	CreatureCache.wdb
         'killCreature3Amount'+divider+ 	//Integer
         'collectItem3'+divider+ 		//Integer 	ItemCache.wdb
         'collectItem3Amount'+divider+ 	//Integer
         'killCreature4'+divider+ 		//Integer 	CreatureCache.wdb
         'killCreature4Amount'+divider+ 	//Integer
         'collectItem4'+divider+ 		//Integer 	ItemCache.wdb
         'collectItem4Amount'+divider+ 	//Integer
         'Objective1'+divider+ 		//String 		If not killCreature1 or collectItem1 this is the objective if set
         'Objective2'+divider+ 		//String 		If not killCreature2 or collectItem2 this is the objective if set
         'Objective3'+divider+ 		//String 		If not killCreature3 or collectItem3 this is the objective if set
         'Objective4'+divider+ 		//String 		If not killCreature4 or collectItem4 this is the objective if set
         #10;

  ItemNameTableHeader =
         'itemID'+divider+ 		//Integer
         'entryLength'+divider+ 	//Integer 	WDB Files
         'name'+divider+ 		//String
         'slot'+divider+ 	 	//Integer 	Added in 2.3
         #10;

  ItemTextTableHeader =
         'ID'+divider+ 		//Integer
         'entryLength'+divider+ 	//Integer 	WDB Files
         'Text'+divider+		//String
         #10;

  PageTextTableHeader =
         'PageID'+divider+	 		//Integer
         'entryLength'+divider+	 	//Integer 	WDB Files
         'PageText'+divider+	 	//String
         'NextPageID'+divider+	 	//Integer
         #10;

  WOWTableHeader =
         'hashID'+divider+	 		//			String	 	MD5 sum of the warden module. This field is 16 bytes, unlike regular wdb ids.
         'entryLength'+divider+	 		//		Integer 	Record length
         'dataLength'+divider+	 		//		Integer 	Length of the next field. This field is always reclen-4 because there is no additional field after it.
         'moduleData'+divider+	 		//		String		Encrypted
         #10;

  NpcHeader =
         'Entry'+divider+	 		//	uint	 -
         'Entrysize'+divider+	 		//	uint	 -
         'prob0'+divider+	 		//	float	 -
         'text0_0'+divider+	 		//	char	 -
         'text0_1'+divider+	 		//	char	 -
         'lang0'+divider+	 		//	uint	 -
         'em0_0'+divider+	 		//	uint	 -
         'em0_1'+divider+	 		//	uint	 -
         'em0_2'+divider+	 		//	uint	 -
         'em0_3'+divider+	 		//	uint	 -
         'em0_4'+divider+	 		//	uint	 -
         'em0_5'+divider+	 		//	uint	 -
         'prob1'+divider+	 		//	float	 -
         'text1_0'+divider+	 		//	char	 -
         'text1_1'+divider+	 		//	char	 -
         'lang1'+divider+	 		//	uint	 -
         'em1_0'+divider+	 		//	uint	 -
         'em1_1'+divider+	 		//	uint	 -
         'em1_2'+divider+	 		//	uint	 -
         'em1_3'+divider+	 		//	uint	 -
         'em1_4'+divider+	 		//	uint	 -
         'em1_5'+divider+	 		//	uint	 -
         'prob2'+divider+	 		//	float	 -
         'text2_0'+divider+	 		//	char	 -
         'text2_1'+divider+	 		//	char	 -
         'lang2'+divider+	 		//	uint	 -
         'em2_0'+divider+	 		//	uint	 -
         'em2_1'+divider+	 		//	uint	 -
         'em2_2'+divider+	 		//	uint	 -
         'em2_3'+divider+	 		//	uint	 -
         'em2_4'+divider+	 		//	uint	 -
         'em2_5'+divider+	 		//	uint	 -
         'prob3'+divider+	 		//	float	 -
         'text3_0'+divider+	 		//	char	 -
         'text3_1'+divider+	 		//	char	 -
         'lang3'+divider+	 		//	uint	 -
         'em3_0'+divider+	 		//	uint	 -
         'em3_1'+divider+	 		//	uint	 -
         'em3_2'+divider+	 		//	uint	 -
         'em3_3'+divider+	 		//	uint	 -
         'em3_4'+divider+	 		//	uint	 -
         'em3_5'+divider+	 		//	uint	 -
         'prob4'+divider+	 		//	float	 -
         'text4_0'+divider+	 		//	char	 -
         'text4_1'+divider+	 		//	char	 -
         'lang4'+divider+	 		//	uint	 -
         'em4_0'+divider+	 		//	uint	 -
         'em4_1'+divider+	 		//	uint	 -
         'em4_2'+divider+	 		//	uint	 -
         'em4_3'+divider+	 		//	uint	 -
         'em4_4'+divider+	 		//	uint	 -
         'em4_5'+divider+	 		//	uint	 -
         'prob5'+divider+	 		//	float	 -
         'text5_0'+divider+	 		//	char	 -
         'text5_1'+divider+	 		//	char	 -
         'lang5'+divider+	 		//	uint	 -
         'em5_0'+divider+	 		//	uint	 -
         'em5_1'+divider+	 		//	uint	 -
         'em5_2'+divider+	 		//	uint	 -
         'em5_3'+divider+	 		//	uint	 -
         'em5_4'+divider+	 		//	uint	 -
         'em5_5'+divider+	 		//	uint	 -
         'prob6'+divider+	 		//	float	 -
         'text6_0'+divider+	 		//	char	 -
         'text6_1'+divider+	 		//	char	 -
         'lang6'+divider+	 		//	uint	 -
         'em6_0'+divider+	 		//	uint	 -
         'em6_1'+divider+	 		//	uint	 -
         'em6_2'+divider+	 		//	uint	 -
         'em6_3'+divider+	 		//	uint	 -
         'em6_4'+divider+	 		//	uint	 -
         'em6_5'+divider+	 		//	uint	 -
         'prob7'+divider+	 		//	float	 -
         'text7_0'+divider+	 		//	char	 -
         'text7_1'+divider+	 		//	char
         'lang7'+divider+	 		//	uint
         'em7_0'+divider+	 		//	uint
         'em7_1'+divider+	 		//	uint
         'em7_2'+divider+	 		//	uint
         'em7_3'+divider+	 		//	uint
         'em7_4'+divider+	 		//	uint
         'em7_5'+divider+	 		//	uint
         #10;
type
  MiniArrayString = array[1..4] of char;
  LargeArrayString = array[1..100] of char;

type
  pHeader = ^rHeader;
  rHeader = packed record
    Signature:MiniArrayString;
    Build:integer;
    Locale:MiniArrayString;
    RowLength:integer;
    Unk1:integer;
  end;

type
  pItemcacheWDB = ^rItemcacheWDB;
  rItemcacheWDB = packed record
    data0:array[1..5] of integer;
    name:array[1..4] of LargeArrayString;
    data1:array[1..96] of integer;
    name1:LargeArrayString;
    data2:array[1..27] of integer;
    data3:single;
end;

type
  pCreatureCacheWDB = ^rCreatureCacheWDB;
  rCreatureCacheWDB =  packed record
    	data0:array[1..2] of integer;
      name:array[1..6] of LargeArrayString;
      data1:array[1..10] of integer;
      data2:array[1..2] of single;
      data3:byte;
  end;

  type
    pGameobjectCacheWDB = ^rGameobjectCacheWDB;
    rGameobjectCacheWDB = packed record
      data0:array[1..4] of integer;
      name:array[1..7] of LargeArrayString;
      data1:array[1..24]of integer;
    end;

  type
    pQuestCacheWDB = ^rQuestCacheWDB;
    rQuestCacheWDB = record
      data0:array[1..48] of integer;
      name:array[1..4] of array[1..2000] of char;
      data1:array[1..16] of integer;
      name1:array[1..4] of array[1..2000] of char;
    end;

  type
    pItemNameCacheWDB = ^rItemNameCacheWDB;
    rItemNameCacheWDB = record
      itemID:Integer;
 	    entryLength:Integer;
 	    name:array[1..2000] of char;
 	    slot:Integer;
    end;

  type
    pItemTextCacheWDB = ^rItemTextCacheWDB;
    rItemTextCacheWDB = record
      ID:Integer;
    	entryLength:Integer;
    	Text:array[1..2000] of char;
    end;

  type
    pPageTextCacheWDB = ^rPageTextCacheWDB;
    rPageTextCacheWDB = packed record
      PageID:Integer;
 	    entryLength:Integer;
    	PageText:array[1..2000] of char;
    	NextPageID:Integer;
    end;

  type
    pWowCacheWDB = ^rWowCacheWDB;
    rWowCacheWDB = packed record
 	    hashID:array[1..16] of char;	// 	MD5 sum of the warden module. This field is 16 bytes, unlike regular wdb ids.
 	    entryLength:Integer; //	Record length
 	    dataLength:Integer; //	Length of the next field. This field is always reclen-4 because there is no additional field after it.
 	    moduleData:array[1..20000] of char;
    end;

  type
    pNpcCacheWDB = ^rNpcCacheWDB;
    rNpcCacheWDB = packed record
      data0:array[1..2] of integer;
      data1:array[1..8] of single;
      text0:array[1..8] of array[1..2] of array[1..2000] of char;
      data2:array[1..8] of array[1..7] of integer;
    end;

var
  PathArray:array[1..9] of string = (
      Path_Itemcache,
      Path_Itemnamecache,
      Path_Gameobjectcache,
      Path_Creaturecache,
      Path_Npccache,
      Path_Wowcache,
      Path_Questcache,
      Path_Itemtextcache,
      Path_Pagetextcache);

  PathArray_write:array[1..5] of string = (
      Path_Itemcache+'.txt',
      Path_Itemnamecache+'.txt',
      Path_Gameobjectcache+'.txt',
      Path_Creaturecache+'.txt',
      Path_Questcache+'.txt'
      );


implementation

end.
 